The filter in bpf was implemented by a pseudo machine , which consists of an accumulator , an index register , a scratch memory store , and an implicit program counter . bpf can be directly programmed via ioctl system call and the pseudo machine instruction set , it can also be programmed by using libpcap function library , which can access many kinds of packet capture facilities provided by oses ( bpf is the important one in them ) Bpf的過(guò)濾器是由假想的過(guò)濾器虛擬機(jī)實(shí)現(xiàn)的,對(duì)bpf的編程,可以通過(guò)ioctl系統(tǒng)調(diào)用和過(guò)濾器虛擬機(jī)的指令集來(lái)直接編程,也可以通過(guò)libpcap提供的庫(kù)函數(shù)來(lái)編程,它能訪問(wèn)許多種操作系統(tǒng)內(nèi)核提供的包過(guò)濾設(shè)施( bpf是其中重要的一種) 。